Add redrawing of Snackbar and Toast when the screen is rotated #1405
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR resolves the issue where when a long message that does not include a line feed code is specified for Snackbar and Toast, it is not drawn correctly after the screen is rotated.
Description of Change
Override the LayoutSubviews method of the RoundedView class that draws the Snackbar and Toast background and call the Draw method so that the Snackbar and Toast are redrawn after the screen is rotated.
[src\CommunityToolkit.Maui.Core\Views\RoundedView.macios.cs]
This will cause Snackbar and Toast to be redrawn after the screen is rotated, so they will be drawn at the intended size.
This also resolves the issue where the corner shapes of Snackbar and Toast appear to have changed without being redrawn.
Linked Issues
PR Checklist
approved
(bug) orChampioned
(feature/proposal)main
at time of PRAdditional information
Below are the verification results after fix.
[Snackbar]
[Toast]
In both execution results, you can see that the Snackbar and Toast are drawn at the intended size after the screen is rotated.